use std::ops::Add;

pub fn generate_FbArray(n:u32)->Vec<i32>{
    let mut list:Vec<i32> = Vec::new();
    list.push(1);
    if n == 1 {
        return list;
    }

    list.push(1);
    if n == 2 {
        return list;
    }

    let mut prev = 1;
    let mut curr = 1;
    for elem in 2..n {
        let temp = curr;
        curr = prev + curr;
        prev = temp;
        list.push(curr);
    }

    return list;
}

//The Twelve Days of Christmas
pub fn print_songliric() {
    let days = ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"];
    let gifts = [
        "a partridge in a pear tree",
        "two turtle doves",
        "three French hens",
        "four calling birds",
        "five gold rings",
        "six geese a-laying",
        "seven swans a-swimming",
        "eight maids a-milking",
        "nine ladies dancing",
        "ten lords a-leaping",
        "eleven pipers piping",
        "twelve drummers drumming"];
    //1->0
    //2->4
    //3->3 2 1
    //4->10 9 8
    //5->7 6 5
    //6->4 3 2 1

    let mut index = 1;
    for elem in days{
        println!("on the {elem} day of Christmas my true love sent to me");
        for number in (0..index).rev() {
            println!("{}",gifts[number]);
        }
        index += 1;
    }

}

